﻿<sap:ActivityDesigner x:Class="Active.Activities.ActivityDesigners.MSBuildCmdDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
		xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
		xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
		xmlns:local="clr-namespace:Active.Activities.ActivityDesigners.Converters"
		mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Loaded="ActivityDesigner_Loaded" Width="Auto">
	<sap:ActivityDesigner.Icon>
		<DrawingBrush>
			<DrawingBrush.Drawing>
				<ImageDrawing>
					<ImageDrawing.Rect>
						<Rect Location="0,0" Size="16,16" ></Rect>
					</ImageDrawing.Rect>
					<ImageDrawing.ImageSource>
						<BitmapImage UriSource="/Active.Activities;component/Resources/MSBuildCmd.png"></BitmapImage>
					</ImageDrawing.ImageSource>
				</ImageDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
	</sap:ActivityDesigner.Icon>
	<sap:ActivityDesigner.Resources>
		<ResourceDictionary>
			<sapc:ArgumentToExpressionConverter x:Key="ArgumentToExpressionConverter" />
			<local:InArgumentBoolConverter x:Key="InArgumentBoolConverter" />
		</ResourceDictionary>
	</sap:ActivityDesigner.Resources>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="*" />
			<RowDefinition Height="*" />
			<RowDefinition Height="*" />
			<RowDefinition Height="*" />
			<RowDefinition Height="*" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="500" />
			<ColumnDefinition Width="70" />
		</Grid.ColumnDefinitions>
		<sapv:ExpressionTextBox 
			Name="txtProject"
			HintText="The project or solution to build" 
			Expression="{Binding Path=ModelItem.Project, Mode=TwoWay, Converter={StaticResource ResourceKey=ArgumentToExpressionConverter}}" 
			OwnerActivity="{Binding Path=ModelItem}" 
			Margin="120,5,5,5" 
			VerticalAlignment="Stretch"
			HorizontalAlignment="Stretch"></sapv:ExpressionTextBox>
		<sapv:ExpressionTextBox 
			HintText="Configuration target (i.e. Clean, Build, Package)" 
			Expression="{Binding Path=ModelItem.Target, Mode=TwoWay, Converter={StaticResource ResourceKey=ArgumentToExpressionConverter}}" 
			OwnerActivity="{Binding Path=ModelItem}" 
			Margin="120,5,5,5" 
			VerticalAlignment="Stretch"
			HorizontalAlignment="Stretch"
			Grid.Row="1"></sapv:ExpressionTextBox>
		<sapv:ExpressionTextBox 
			HintText="Project/Solution configuration to build (i.e. Debug, Release)" 
			Expression="{Binding Path=ModelItem.Configuration, Mode=TwoWay, Converter={StaticResource ResourceKey=ArgumentToExpressionConverter}}" 
			OwnerActivity="{Binding Path=ModelItem}"
			Margin="120,5,5,5" 
			VerticalAlignment="Stretch"
			HorizontalAlignment="Stretch"
			Grid.Row="2"></sapv:ExpressionTextBox>
		<sapv:ExpressionTextBox 
			HintText="Platform to build (i.e. AnyCPU, x86, x64)" 
			Expression="{Binding Path=ModelItem.Platform, Mode=TwoWay, Converter={StaticResource ResourceKey=ArgumentToExpressionConverter}}" 
			OwnerActivity="{Binding Path=ModelItem}"
			Margin="120,5,5,5" 
			VerticalAlignment="Stretch"
			HorizontalAlignment="Stretch"
			Grid.Row="3"></sapv:ExpressionTextBox>
		<sapv:ExpressionTextBox 
			HintText="Any additional MSBuild command line arguments" 
			Expression="{Binding Path=ModelItem.AdditionalCommandLineArguments, Mode=TwoWay, Converter={StaticResource ResourceKey=ArgumentToExpressionConverter}}" 
			OwnerActivity="{Binding Path=ModelItem}"
			Margin="120,5,5,5" 
			VerticalAlignment="Stretch"
			HorizontalAlignment="Stretch"
			Grid.Row="4"></sapv:ExpressionTextBox>
		<Label Content="Project / Solution :" Height="28" HorizontalAlignment="Left" Margin="5,3,0,0" VerticalAlignment="Top" />
		<Label Content="Target :" Height="28" HorizontalAlignment="Left" Margin="5,3,0,0" VerticalAlignment="Top" Grid.Row="1" />
		<Label Content="Configuration :" Height="28" HorizontalAlignment="Left" Margin="5,3,0,0" VerticalAlignment="Top" Grid.Row="2" />
		<Label Content="Platform :" Height="28" HorizontalAlignment="Left" Margin="5,3,0,0" VerticalAlignment="Top" Grid.Row="3" />
		<Label Content="Additional Params :" Height="28" HorizontalAlignment="Left" Margin="5,3,0,0" VerticalAlignment="Top" Grid.Row="4" />
		<Button Content="..." Height="23" HorizontalAlignment="Left" Name="btnPickProjectPath" VerticalAlignment="Top" Width="28" Grid.Column="1" Margin="8,4,0,0" Click="btnPickProjectPath_Click" />
		<Button Content="Rel" ToolTip="Convert To Relative Path" Height="23" HorizontalAlignment="Left" Name="btnConvertProjectPathToRelative" VerticalAlignment="Top" Width="28" Grid.Column="1" Margin="42,4,0,0" Click="btnConvertProjectPathToRelative_Click" />
	</Grid>
</sap:ActivityDesigner>
